
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>登入 - {{LZY_ADMIN}}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="{{ADMIN_PATH}}layui/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="{{ADMIN_PATH}}layui/layuiadmin/style/admin.css" media="all">
  <link rel="stylesheet" href="{{ADMIN_PATH}}layui/layuiadmin/style/login.css" media="all">
</head>
<body>

  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
    <div class="layadmin-user-login-main">
      <div class="layadmin-user-login-box layadmin-user-login-header">
        <h2>此功能不开启</h2>
        <p></p>
      </div>
      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">



      </div>
    </div>

    <div class="layui-trans layadmin-user-login-footer">


      <p>

      </p>
    </div>

  </div>

<script src="{{ADMIN_PATH}}layui/layuiadmin/layui/layui.js"></script>
  <script>
  layui.config({
      base: '{{ADMIN_PATH}}layui/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'user'], function(){
    var $ = layui.$
    ,setter = layui.setter
    ,admin = layui.admin
    ,form = layui.form
    ,router = layui.router();

    form.render();

    //找回密码下一步
    form.on('submit(LAY-user-forget-submit)', function(obj){
      var field = obj.field;

      //请求接口
      admin.req({
        url: layui.setter.base + 'json/user/forget.js' //实际使用请改成服务端真实接口
        ,data: field
        ,done: function(res){
          location.hash = '/type=resetpass';
          location.reload();
        }
      });

      return false;
    });

    //重置密码
    form.on('submit(LAY-user-forget-resetpass)', function(obj){
      var field = obj.field;

      //确认密码
      if(field.password !== field.repass){
        return layer.msg('两次密码输入不一致');
      }

      //请求接口
      admin.req({
        url: layui.setter.base + 'json/user/resetpass.js' //实际使用请改成服务端真实接口
        ,data: field
        ,done: function(res){
          layer.msg('密码已成功重置', {
            offset: '15px'
            ,icon: 1
            ,time: 1000
          }, function(){
            location.href = 'login.html'; //跳转到登入页
          });
        }
      });

      return false;
    });

  });
  </script>
</body>
</html>